package com.xclink.wechat.service.core.ReplyMessage;

import java.util.Date;

import com.xclink.wechat.utils.message.MessageUtil;
import com.xclink.wechat.utils.message.resp.Voice;
import com.xclink.wechat.utils.message.resp.VoiceMessage;

/**
 * 集中处理语音消息之回复语音消息
 * @author ljp
 *
 */
public class ProcessVoiceMessage {
	public String process(String toUserName,String fromUserName,String mediaId){
		// 自动回复 语音消息
		VoiceMessage voiceMessage = new VoiceMessage();
		Voice voice = new Voice();
		voice.setMediaId(mediaId);
		voiceMessage.setFromUserName(toUserName);
		voiceMessage.setToUserName(fromUserName);
		voiceMessage.setCreateTime(new Date().getTime());
		voiceMessage.setVoice(voice);
		voiceMessage.setMsgType(MessageUtil.RESP_MESSAGE_TYPE_VOICE);
		return MessageUtil.messageToXml(voiceMessage);
	}
}
